//
//  JMPickerView.h
//  NbTest
//
//  Created by admin on 12-3-10.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

/*
 1单例需要在程序退出时 调用delocateInstance 确保释放内存
 直接使用类函数PopViewWithYYString来弹出显示
 */

//@protocol JMPickerViewDelegate <NSObject>
//    -(void) didSeleted:(int) index;
//@end


#import <Foundation/Foundation.h>
#import "SheetViewController.h"

@interface JMPickerView : NSObject<UIPickerViewDelegate,UIPickerViewDataSource>{
    
    int*            _YYSelectRow;
    int             _selectRow;
    UILabel*        _titleLabel;    
    UIActionSheet*  _actionSheet;
    UITableView*    _tableView;
    NSMutableString* _YYSelString;  //传出参数 引用    
	UIPickerView *  _pickView; 
	NSArray *_arrayPickView; //data数组
}

@property (nonatomic, retain) UIPickerView *_pickView; 
@property (nonatomic, retain) NSArray *_arrayPickView;  //data数组
@property (nonatomic, retain) NSMutableString *_YYSelString;
@property (nonatomic, retain) UILabel *_titleLabel;
@property (nonatomic, retain)  UIActionSheet*  _actionSheet;
@property (nonatomic, retain) SheetViewController* sheetVC;

@property (nonatomic, retain)UITableView*    _tableView;
@property (nonatomic, assign) int             _selectRow;
@property (nonatomic, assign) int*          _YYSelectRow;
@property (nonatomic, assign) id<JMPickerViewDelegate> iDelegate;


+(void)PopViewWithYYString:(NSMutableString*)aString andIn:(UITableView*) aView andTitle:(NSString*) aTitle andArray:(NSArray*) aArray;//弹出选择

//带delegate
+(void)PopViewWithYYString:(NSMutableString*)aString andIn:(UITableView*) aView andTitle:(NSString*) aTitle  andArray:(NSArray*) aArray with:(id<JMPickerViewDelegate>) aDelegate;

+(void)PopViewWithYYString:(NSMutableString*)aString andIn:(UITableView*) aView andTitle:(NSString*) aTitle andArray:(NSArray*) aArray andYYSeleRow:(int*) aYYSelet;//弹出选择 修改aYYSelet


+ (id) getInstance;
+ (void) delocateInstance;

-(void)selectDateAffirm;//确定
-(void)selectDateCanceled;//取消

+ (NSMutableArray*) getThePickViewDateArray;

@end
